<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ include file="../common/header.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <m:require src="jquery,noty,ev,font,bootstrap,common,kt,{{xlink/add_sensor}}"></m:require>
    <title>添加传感器</title>
</head>
<body>
<div id="top">
    <div id="logo"><span>Xlink</span></div>
    <div id="userInfo">
        <ul>
            <li><div id="head"></div><a href="#"><%=session.getAttribute("userName")%></a></li>
            <li><a href="#">我的消息</a></li>
            <li><a href="index.html">返回首页</a></li>
            <li><a href="#" id="loginOut">退出</a></li>
        </ul>
    </div>
</div>
<div id="first">
    <ul>
        <li><a href="#">管理首页</a></li>
        <li><a href="#">我的终端</a></li>
        <li><a href="mydevice.html">设备开发</a></li>
        <li><a href="#">产品开发</a></li>
        <li><a href="account.html">账户</a></li>
    </ul>
</div>
<div id="second">
    <div id="left">
        <ul>
            <li><a href="add_device.html">创建新设备</a></li>
            <li><a href="mydevice.html">我的设备</a></li>
            <li><a href="#">设备动作</a></li>
        </ul>
    </div>
    <div id="right">
        <h2>添加传感器</h2>
        <hr/>
        <form id="sensorForm" deviceId>
            <span>传感器名</span>
            <input type="text" id="title"  placeholder="传感器名称，限30个字符" >
            <span>标签（tags）</span>
            <input type="text" id="tags" placeholder="按下回车或者Tab键输入">
            <span>类型</span>
            <select id="type">
                <option value ="1" id="dataType">数据型</option>
                <option value ="2" id="GPStype">GPS型</option>
                <option value ="3" id="openCloseType">开关型</option>
            </select>
            <span>单位/符号</span>
            <input type="text" id="unit" placeholder="摄氏度/">
            <span>数据修正公式</span>
            <input type="text" id="formula" placeholder="支持带有括号的四则运算, v代表当前值，示例：(v + 1) * 1 + 10">
            <span>默认显示时间段</span>
            <select id="period">
                <option value ="1" selected="">10分钟</option>
                <option value ="2" selected="">1小时</option>
                <option value ="3" selected="">3小时</option>
                <option value ="4" selected="">12小时</option>
                <option value ="5" selected="">1天</option>
                <option value ="6" selected="">1周</option>
                <option value ="7" selected="">1月</option>
                <option value ="8" selected="">3月</option>
            </select>
            <span>故障检测时间</span>
            <input type="text" id="time" placeholder="如果为空默认为30分钟，最小间隔为30分钟">
            <span>描述</span>
            <textarea id="about" placeholder="描述一下你的传感器"></textarea>
            <input type="button" value = "保存" id="submit">
        </form>
    </div>

</div>
<div id="bottom"></div>

</body>
</html>

